package com.gz.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.gz.utils.DataFmtUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;

/**
 * 标签信息表(LabelInfo)实体参数类
 *
 * @author makejava
 * @since 2024-02-23 10:55:54
 */
@Data
@ApiModel("标签实体参数类")
public class LabelInfoDto extends PageInfoDto implements Serializable {

  private static final long serialVersionUID = 362012761099289729L;
  @ApiModelProperty("主键,自增")
  private Integer id;
  @ApiModelProperty("标签主键集合")
  private List<Integer> ids;
  @ApiModelProperty("标签名称")
  private String labelName;
  @ApiModelProperty("归属学层")
  private String blLevel;
  @ApiModelProperty("归属年级")
  private String blGrade;
  @ApiModelProperty("科目")
  private String subject;
  @ApiModelProperty("状态,1:启用,0:禁用 默认1")
  private Integer status;
  @ApiModelProperty("数据创建人id")
  private Integer crtId;
  @ApiModelProperty("数据创建人时间")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private Date crtDt;
  @ApiModelProperty("数据更新人id")
  private Integer optId;
  @ApiModelProperty("数据更新时间")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private Date optDt;
  @ApiModelProperty("排序字段")
  private String orderField;
  @ApiModelProperty("排序类型")
  private String orderType;

  public String getOrderField() {
    if (!StringUtils.isEmpty(orderField)) {
      return DataFmtUtil.xX2x_x(orderField);
    }
    return orderField;
  }

}

